How to Deploy a Java Application

In this article, we will show you how to deploy your Java web project to our cloud platform.

Precondition:

  • An FTP client like FileZilla client has been installed on your local PC;

  • A Java web project on your local PC;

  • You have a JavaPaaS service installed;

1. Transfer your Java project to the Cloud Clusters platform

Please refer to Transferring Data via FTPS to upload your Java project to the Cloud Clusters platform.

Note: The target directory for uploads should be /cloudclusters/apps.

In this example, we will upload a JAR file named test.jar to the /cloudclusters/apps directory.

Upload a JAR file to the target directory

2. Add a web service in the Control panel

Locate your target application on the My Applications page, and click the Manage button.

Locate JavaPaaS app

Then, click the “Deployment” tab.

Click the deployment tab

Scroll down to the Java App Deployment section and click Deploy App, followed by inputting the required information.

  • App Name: any name will work.
  • Port: the process/service listening port (The listening port must be the same as the one used by your code)
  • Start Command: java -jar #Please replace the file name with the one you uploaded to the app directory in the last step.
  • Domain: Choose the domain name. It could be the default domain or the custom one you newly created.
  • Context Path: Specify a path.

Deploy a JavaPaaS app

Here you can see the web service has been added. Newly created JavaPaaS app

3. Check if your Java web project works in web shell

Go to the Shell/SSH tab and initiate a shell session.

Initial a shell session

Use the command to check if the Jave web project is running.

supervisorctl status

Verify a running service

4. Check if your Java project works in a browser

That's it! You've added your Java project to our platform successfully! If you need further assistance, feel free to contact us for technical support.

Copyright © 2021 Cloud Clusters Inc. all right reserved,powered by GitbookRevised on 07/06/2023

results matching ""

    No results matching ""